{*
# $Id: install.fs 108 2010-04-11 19:22:55Z Administrator $
# $Revision: 108 $
# $Author: Administrator $
# $Date: 2010-04-12 03:22:55 +0800 (星期一, 12 四月 2010) $
*}{if $smarty.session.wml==0}
{include file=$smarty.const.__FASTTPL__|cat:"head.fs"}
<script type="text/javascript">
function check(obj){literal}{{/literal}
	if(!obj.{$smarty.const.__FASTMVC_ACT__}.value)
	{literal}{{/literal}
		alert('Sorry!You must select a module!');
		return false;
	{literal}}{/literal}
{literal}}{/literal}
</script>
<p><a href="{'wml=1'|rewrite:'list'}">Using the wml version</a></p>
<form action="{$smarty.const.__FASTMVC_ROOT__}" onsubmit="return check(this);">
<h4>Please choose module you want to operate, then install or remove the module.</h4>
<ol>
{foreach from=$modules item="m"}
	<li><label><input type="radio" value="{$m}" name="{$smarty.const.__FASTMVC_M__}" />{$m}&nbsp;{if array_key_exists($m,$desc)}{$desc.$m}{/if}</label></li>
{/foreach}
</ol>
<p>
	<input type="hidden" name="{$smarty.const.__FASTMVC_ACT__}" value="" {$site.tagclose}>
	<input type="submit" onclick='this.form.{$smarty.const.__FASTMVC_ACT__}.value="install"' value="install"{$site.tagclose}>&nbsp;
	<input type="submit" onclick='this.form.{$smarty.const.__FASTMVC_ACT__}.value="remove"' value="remove"{$site.tagclose}>&nbsp;
	<input type="submit" onclick='this.form.{$smarty.const.__FASTMVC_ACT__}.value="enable"' value="enable" {$site.tagclose}>&nbsp;
	<input type="submit" onclick='this.form.{$smarty.const.__FASTMVC_ACT__}.value="disable"' value="disable"{$site.tagclose}>
	<input type="submit" onclick='this.form.{$smarty.const.__FASTMVC_ACT__}.value="lock"' value="lock"{$site.tagclose}>
</p>
</form>
<p>Unless you sure you want to carry out the operation, otherwise chaos will not operate. The wrong action will bring about loss of data. When you are finished the module set-point lock to lock.</p>
<div>

<form action="{''|rewrite:'save'}" method="post">
<fieldset><legend>database set</legend>
<p>
host:<input type="text" name="Server" value="{$site.database.Server}"{$site.tagclose}><br {$site.tagclose}>
user:<input type="text" name="user" value="{$site.database.user}"{$site.tagclose}><br {$site.tagclose}>
pass:<input type="text" name="pwd" value="{$site.database.pwd}"{$site.tagclose}><br {$site.tagclose}>
database:<input type="text" name="db" value="{$site.database.db}"{$site.tagclose}><br {$site.tagclose}>
charset:<input type="text" name="charset" value="{$site.database.charset|default:'utf8'}"{$site.tagclose}><br {$site.tagclose}>
data_prefix:<input type="text" name="data_prefix" value="{$site.database.data_prefix}"{$site.tagclose}><br {$site.tagclose}>
driver:<input type="text" name="driver" value="{$site.database.driver}"{$site.tagclose}><br {$site.tagclose}>
{if $database}<span style="color:green">connected!</span>{else}<span style="color:red;">Can't connect this server!</span>{/if}
</p></fieldset><fieldset><legend>site set</legend>
<p>site set<br  {$site.tagclose}>
title:<input type="text" name="siteName" value="{$site.siteName|default:'NoName'}"{$site.tagclose}><br {$site.tagclose}>
default timezone:<select name="timezone">
{foreach from=$timezone item="zone" key='key' name="zoneweb"}
<optgroup label="{$key}">
{if $key=='GMT'}
{foreach from=$zone item="z"}
<option value="{$z}" {if $site.timezone==$z}selected="seleced"{/if}>{'substr'|call:$z:4}</option>
{/foreach}
{else}
{foreach from=$zone item="z"}
<option value="{$key|cat:'/'|cat:$z}" {if $site.timezone==$key|cat:'/'|cat:$z}selected="seleced"{/if}>{$z}</option>
{/foreach}
{/if}
</optgroup>
{/foreach}
</select>{$smarty.now|date_format:'%Y-%m-%d %H:%M:%S'}<br {$site.tagclose}>
rewriteRule:<input type="text" name="rewriteRule" value="{$site.rewriteRule}"{$site.tagclose}>eg: %ac%_%m%_%control%_%QUERY_STRING%.html<br {$site.tagclose}>
</p>
</fieldset>
<p><input type="submit" value="save" {$site.tagclose}></p>
</form>

</div>
{include file=$smarty.const.__FASTTPL__|cat:"foot.fs"}
{else}
<p><a href="{'wml=0'|rewrite:'list'}">Using the web version</a></p>
<p><select name="module" title="Please choose module you want to operate, then install or remove the module.">
<!--{foreach from=$modules item="m"}-->
	<option value="{$m}">{$m}{if array_key_exists($m,$desc)}{$desc.$m}{/if}</option>
<!--{/foreach}-->
</select></p>
<p><anchor>install
<go href="{$smarty.const.__FASTMVC_ROOT__}" method="get">
	<!--{'formfield'|call}-->
	<postfield name="{$smarty.const.__FASTMVC_ACT__}" value="install"/>
	<postfield name="{$smarty.const.__FASTMVC_M__}" value="$(module)"/>
</go>
</anchor>
<anchor>remove
<go href="{$smarty.const.__FASTMVC_ROOT__}" method="get">
	<!--{'formfield'|call}-->
	<postfield name="{$smarty.const.__FASTMVC_ACT__}" value="remove"/>
	<postfield name="{$smarty.const.__FASTMVC_M__}" value="$(module)"/>
</go>
</anchor>
<anchor>enable
<go href="{$smarty.const.__FASTMVC_ROOT__}" method="get">
	<!--{'formfield'|call}-->
	<postfield name="{$smarty.const.__FASTMVC_ACT__}" value="enable"/>
	<postfield name="{$smarty.const.__FASTMVC_M__}" value="$(module)"/>
</go>
</anchor>
<anchor>disable
<go href="{$smarty.const.__FASTMVC_ROOT__}" method="get">
	<!--{'formfield'|call}-->
	<postfield name="{$smarty.const.__FASTMVC_ACT__}" value="disable"/>
	<postfield name="{$smarty.const.__FASTMVC_M__}" value="$(module)"/>
</go>
</anchor>
<anchor>lock
<go href="{$smarty.const.__FASTMVC_ROOT__}" method="get">
	<!--{'formfield'|call}-->
	<postfield name="{$smarty.const.__FASTMVC_ACT__}" value="lock"/>
	<postfield name="{$smarty.const.__FASTMVC_M__}" value="$(module)"/>
</go>
</anchor>
</p>
<p>Waring:Unless you sure you want to carry out the operation, otherwise chaos will not operate. The wrong action will bring about loss of data. When you are finished the module set-point lock to lock.</p>
<p><b>database set</b><br {$site.tagclose}>
host:<input type="text" name="Server" value="{$site.database.Server}" title="host" {$site.tagclose}><br {$site.tagclose}>
user:<input type="text" name="user" value="{$site.database.user}" title="user" {$site.tagclose}><br {$site.tagclose}>
pwd:<input type="text" name="pwd" value="{$site.database.pwd}" title="pwd"{$site.tagclose}><br {$site.tagclose}>
database:<input type="text" name="db" value="{$site.database.db}" title="db"{$site.tagclose}><br {$site.tagclose}>
charset:<input type="text" name="charset" value="{$site.database.charset|default:'utf8'}" title="charset"{$site.tagclose}><br {$site.tagclose}>
data_prefix:<input type="text" name="data_prefix" value="{$site.database.data_prefix}" title="data_prefix"{$site.tagclose}><br {$site.tagclose}>
driver:<input type="text" name="driver" value="{$site.database.driver}" title="driver"{$site.tagclose}><br {$site.tagclose}>
{if $database}connected!{else}Can't connect this server!{/if}
</p>
<p><b>site set</b><br {$site.tagclose}>
siteName:<input type="text" name="siteName" value="{$site.siteName|default:'NoName'}" title="siteName"{$site.tagclose}><br {$site.tagclose}>
default timezone:<select name="timezone">
{foreach from=$timezone item="zone" key='key' name="zoneweb"}
<optgroup label="{$key}">
{if $key=='GMT'}
{foreach from=$zone item="z"}
<option value="{$z}" {if $site.timezone==$z}selected="seleced"{/if}>{'substr'|call:$z:4}</option>
{/foreach}
{else}
{foreach from=$zone item="z"}
<option value="{$key|cat:'/'|cat:$z}" {if $site.timezone==$key|cat:'/'|cat:$z}selected="seleced"{/if}>{$z}</option>
{/foreach}
{/if}
</optgroup>
{/foreach}
</select>{$smarty.now|date_format:'%Y-%m-%d %H:%M:%S'}<br {$site.tagclose}>
rewriteRule:<input type="text" name="rewriteRule" value="{$site.rewriteRule}" title="rewriteRule"{$site.tagclose}>eg: %ac%_%m%_%control%_%QUERY_STRING%.html<br {$site.tagclose}>
</p>
<p>
<anchor>save
	<go href="{''|rewrite:'save'}" method="post">
	<!--{'formfield'|call}-->
	<postfield name="Server" value="$(Server)"/>
	<postfield name="user" value="$(user)"/>
	<postfield name="pwd" value="$(pwd)"/>
	<postfield name="db" value="$(db)"/>
	<postfield name="charset" value="$(charset)"/>
	<postfield name="data_prefix" value="$(data_prefix)"/>
	<postfield name="driver" value="$(driver)"/>
	<postfield name="siteName" value="$(siteName)"/>
	<postfield name="timezone" value="$(timezone)"/>
	<postfield name="rewriteRule" value="$(rewriteRule)"/>
</go>
</anchor></p>
{/if}